package com.loan.util;
import com.alibaba.fastjson.JSONObject;

public class Gateway {
	private static String URL =  "https://api4.udcredit.com/dsp-front/4.1/dsp-front/default/pubkey/a0422224-3436-4f16-8241-c03a16bc9fa4/product_code";
	
	/**
	 * 接口调用 
	 * @param service
	 * @param data
	 * @return
	 * @throws Exception 
	 */
	public static JSONObject post(String service, JSONObject json) throws Exception {
		String s = URL+"/"+service+"/out_order_id/"+DateUtil.getTimeStamp()+"/signature/"+MD5Util.encrypt(json.toJSONString()+"|6181998a-0c34-4cf9-82fe-81907e7bb141");
		System.out.println(s);
		System.out.println(json.toJSONString());
		return Http.post(s, json);
	}
}
